﻿using System;
using System.IO;
using System.Web;
using System.Drawing;
using System.Drawing.Imaging;

/// <summary>
/// C# Date Differential
/// Object that calculates the days, months, and years... since or until another earlierDate.
/// </summary>
namespace MikeKappel.Com.CS
{
    /// <summary>
    /// 
    /// </summary>
    public static partial class Images
    {
        /// <summary>
        /// <example>
        /// Response.Clear();
        /// Response.Write(MikeKappel.Com.CS.Images.ImageGetString(Server.MapPath("favicon.ico")));
        /// Response.Flush();
        /// Response.End();
        /// </example>
        /// </summary>
        /// <param name="file"></param>
        /// <returns></returns>
        public static String ImageGetString(String file)
        {
            FileStream fs = File.OpenRead(file);
            Byte[] data = new Byte[fs.Length];
            fs.Read(data, 0, data.Length);
            String result = "";
            for (Int32 i = 0; i < data.Length; i++)
            {
                if (result != "")
                    result += " ";
                result += data[i].ToString();
            }
            return result;
        }
    }
}